﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.HRM
{
    [Table("hrm_ps_employee_types"), DataContract]
    public class MasEmployeeType
    {
        public MasEmployeeType()
        {
            RecordStatus = "U";
        }

        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Display(Name = "EmpTypeId", ResourceType = typeof(Resources.MasEmployeeTypeResource))]
        [Column("emp_type_seq")]
        public int EmpTypeId { get; set; }

        [DataMember, Display(Name = "Name", ResourceType = typeof(Resources.MasEmployeeTypeResource))]
        [Column("emp_type_name")]
        public string Name { get; set; }

        [DataMember, Display(Name = "SalaryUpTime", ResourceType = typeof(Resources.MasEmployeeTypeResource))]
        [Column("salary_up_time")]
        public int? SalaryUpTime { get; set; }

        [DataMember, Display(Name = "AgeRetirement", ResourceType = typeof(Resources.MasEmployeeTypeResource))]
        [Column("age_retirement")]
        public int? AgeRetirement { get; set; }

        [ForeignKey("YearType")]
        [DataMember, Display(Name = "YearTypeId", ResourceType = typeof(Resources.MasEmployeeTypeResource))]
        [Column("year_type_seq")]
        public int? YearTypeId { get; set; }

        [DataMember, Display(Name = "Remarks", ResourceType = typeof(Resources.MasEmployeeTypeResource))]
        [Column("remarks")]
        public string Remarks { get; set; }

        [EnumDataType(typeof(SYS.RecordStatus.EnumRecordStatus))]
        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.MasEmployeeTypeResource))]
        [Column("record_status")]
        public string RecordStatus { get; set; }

        [Column("created_by")]
        public int? CreatedBy { get; set; }
        [Column("created_when")]
        public DateTime? CreatedWhen { get; set; }
        [Column("updated_by")]
        public int? UpdatedBy { get; set; }
        [Column("updated_when")]
        public DateTime? UpdatedWhen { get; set; }

        public virtual SYS.YearType YearType { get; set; }
    }
}
